﻿@page "/Account/My/ShareCode"
@inherits YiMeiJiaService.Assembly.BaseComponent
@using Newtonsoft.Json;
@using YiMeiJiaLibModel.Config
@using YiMeiJiaApp.Pages.Components
@using YiMeiJiaLibModel.Business


<Headers MyPartialText="邀请码" Icon="/Images/home-fff.png"></Headers>

<script src="@ApiConf.ApiStatic()/js/jquery.qrcode.min.js"></script>
@if (_userData != null)
{
    <div class="cm-app-container cm-txt-center">
        <div class="weui-flex cd-data">
            <div id="qrcode"></div>
        </div>
    </div>

   
    <script>
        window.onload= function (){
            new QRCode(document.getElementById('qrcode'), 'your content');
            // 设置参数方式
            var qrcode = new QRCode('qrcode', {
                text: 'your content',
                width: 256,
                height: 256,
                colorDark: '#000000', //前景色
                colorLight: ' #ffffff ', //背景色
                correctLevel: QRCode.CorrectLevel.H  //纠错等级
            });
            // 使用 API
            qrcode.clear();  //清除二维码。（仅在不支持 Canvas 的浏览器下有效）
            qrcode.makeCode('new content');   //设置二维码内容，生成二维码
        }
       


    </script>
}




@code {

}


<style>
    #appHeader .title-box {
        background: linear-gradient(to top, #f75556, #f8492a);
        border: none;
        color: #fff;
    }

    #appHeader .title-center {
        color: #fff;
    }

</style>
